1. Field of the Invention
The present invention relates to a data backup method for storing data in a nonvolatile memory, and also relates to a memory device that employs the data backup method to store data in a nonvolatile memory.
2. Description of Related Art
Conventional memory devices may suffer from problems such as corruption of data stored therein resulting from, for example, the power being shut off during the writing of data to the memory. In order to prevent this, JP-A-H10-320301 has proposed providing a memory with two data-writing areas and writing data alternately thereto. This makes it possible to protect the data written in one data-writing area even if the power is shut off during the writing of data to the other data-writing area.
In the fail-safe system parameter rewriting device disclosed in JP-A-H10-320301 mentioned above, a nonvolatile memory portion is divided into side A and side B, and on each side are provided a parameter area for storing system parameters, a checksum area for storing checksum data, and a sequence counter area having a sequence counter for indicating whether the system parameters are the newer or the older.
In the fail-safe system parameter rewriting device configured as described above, when the system is started up, in order to find the latest updated side, a sum check is performed on sequence parameters on each of side A and side B. If the sum checks on the sequence parameters on both side A and side B are found to be all right, then the sequence counter value of side A and the sequence counter value of side B are compared with each other in order to find which of side A and side B is the latest updated side.